<?php echo $this->partial("sidebar.phtml", array('type' => 'myaccount','params'=>array('type'=>'account'))); ?>
<div class="myaccount pull-right vertical-scroller">
    <?php
        $errorsMessages = $this->form->getMessages();

        if (!empty($errorsMessages))
        {
            ?>
            <div class="error-panel">
                <ul>
                    <?php
                    //pr($errorsMessages);
                    //-------username------------------------------
                    if (isset($errorsMessages['username']['isEmpty']))
                    {
                        echo "<li>Username is required field.</li>";
                    }
                    if (isset($errorsMessages['username']['recordFound']))
                    {
                        echo "<li>Username not available.</li>";
                    }
                    //----------first name--------------------------
                    if (isset($errorsMessages['first_name']['isEmpty']))
                    {
                        echo "<li>First Name is required field.</li>";
                    }
                    //-------- last name----------------------------
                    if (isset($errorsMessages['first_name']['isEmpty']))
                    {
                        echo "<li>Last Name is required field.</li>";
                    }
                    //-------month----------------------------------
                    if (isset($errorsMessages['month']['isEmpty']))
                    {
                        echo "<li>Month is required field</li>";
                    }
                    if (isset($errorsMessages['month']['notBetween']) || isset($errorsMessages['month']['notDigits']))
                    {
                        echo "<li>Month value not proper</li>";
                    }
                    //------day------------------------------------
                    if (isset($errorsMessages['day']['isEmpty']))
                    {
                        echo "<li>Day is required field</li>";
                    }
                    if (isset($errorsMessages['day']['notBetween']) || isset($errorsMessages['day']['notDigits']))
                    {
                        echo "<li>Day value not proper</li>";
                    }
                    //-----Year ------------------------------------
                    if (isset($errorsMessages['year']['isEmpty']))
                    {
                        echo "<li>Year is required field</li>";
                    }
                    if (isset($errorsMessages['year']['notDigits']))
                    {
                        echo "<li>year value not proper</li>";
                    }
                    if (isset($errorsMessages['year']['notLessThan']))
                    {
                        echo "<li>Age should be 18 above</li>";
                    }
                    //------address ----------------------------------
                    if (isset($errorsMessages['address']['isEmpty']))
                    {
                        echo "<li>Address is required field</li>";
                    }
                    //-----city --------------------------------------
                    if (isset($errorsMessages['city']['isEmpty']))
                    {
                        echo "<li>City is required field</li>";
                    }
                    //----state -------------------------------------
                    if (isset($errorsMessages['state']['isEmpty']))
                    {
                        echo "<li>State is required field</li>";
                    }
                    //---- zip code ----------------------------------
                    if (isset($errorsMessages['zip_code']['isEmpty']))
                    {
                        echo "<li>Zip Code is required field</li>";
                    }
                    if (isset($errorsMessages['zip_code']['notAlnum']))
                    {
                        echo "<li>Zip Code is not proper</li>";
                    }
                    //------country---------------------------------
                    if (isset($errorsMessages['country']['isEmpty']))
                    {
                        echo "<li>Country is required field.</li>";
                    }
                    ?>
                </ul>
            </div>

            <?php
        }
    ?>

    <form method="post">
        <div class="headline">
            <h3 class="pull-left">User Settings</h3>
            <button type="submit" class="btn btn-raeken pull-right">Save Info</button>
        </div>
        <br>
        <table class="account-settings">
            <tr>
                <td width="200" class="text-right">
                    <table class="tbody">
                        <tr><td>Username:</td></tr>
                        <tr><td>Email Address:</td></tr>
                    </table>
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                <?php echo $this->form->username; ?>
                                <!--<input type="text" name="username" class="form-control form-customized" value="<?php echo $this->userdata['username']; ?>">-->
                            </td>
                        </tr>
                        <tr><td>
                                <!--<input type="text" name="email_address" class="form-control form-customized" value="<?php echo $this->userdata['email_address']; ?>">-->
                                <div class="email-box color-orange">
                                    <?php echo $this->userdata['email_address']; ?>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td width="200" class="text-right">
                    <table class="tbody">
                        <tr><td>First Name:</td></tr>
                        <tr><td>Last Name:</td></tr>
                        <tr><td>Date of Birth:</td></tr>
                    </table>
                </td>
                <td>

                    <table>
                        <tr>
                            <td>
                                <?php echo $this->form->first_name; ?>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <?php echo $this->form->last_name; ?>
                            </td>
                        </tr>
                        <tr>
                            <td class = "">
                                <?php echo $this->form->month; ?>
                                <?php echo $this->form->day; ?>
                                <?php echo $this->form->year; ?>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td width = "200" class = "text-right">
                    <table class = "tbody">
                        <tr><td>Street Address:</td></tr>
                        <tr><td>City:</td></tr>
                        <tr><td>State:</td></tr>
                        <tr><td>Zip Code:</td></tr>
                        <tr><td>Country:</td></tr>
                        <tr><td></td></tr>
                        <tr><td></td></tr>
                    </table>
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                <?php echo $this->form->address; ?>
                            </td></tr>
                        <tr><td>
                                <?php echo $this->form->city; ?>
                            </td></tr>
                        <tr><td>
                                <?php echo $this->form->state; ?>
                            </td></tr>
                        <tr><td>
                                <?php echo $this->form->zip_code; ?>
                            </td></tr>
                        <tr><td>
                                <?php echo $this->form->country; ?>    
                            </td></tr>
                        <tr>
                            <td class = "">
                                <?php echo $this->form->promotion_mail; ?>
                                <span class = "pull-left">&nbsp;
                                    Email Me Promotions</span>
                            </td>
                        </tr>
                        <tr>
                            <td class = "">
                                <?php echo $this->form->updates_mail; ?>
                                <span class = "pull-left">&nbsp;
                                    Sent Me Updates</span>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <br>
        <div class = "headline">
            <button type = "submit" class = "btn btn-raeken pull-right">Save Info</button>
        </div>
    </form>
    <br>
</div>